package com.xydtech.ecard.ftp.enums;

/**
 * @Author: liliya
 * @Description:
 * ftp_deposit_loan_rate_config
 *   `config_name` varchar(10) DEFAULT NULL COMMENT '期限中文名称'
 * @Date: Created in 2023/8/16 19:36
 * @Modified:
 */

public enum FtpDepositLoanRateConfigKeyDaysTypeEnum {

    N_1("隔夜","0/N",1),
    N_2("隔夜","0/N",2),
    N_3("隔夜","0/N",3),
    N_4("隔夜","0/N",4),
    N_5("隔夜","0/N",5),
    N_6("隔夜","0/N",6),
    W_7("1周","1W",7),
    W_8("1周","1W",8),
    W_9("1周","1W",9),
    W_10("1周","1W",10),
    W_11("1周","1W",11),
    W_12("1周","1W",12),
    W_13("1周","1W",13),
    W_14("2周","2W",14),
    W_15("2周","2W",15),
    W_16("2周","2W",16),
    W_17("2周","2W",17),
    W_18("2周","2W",18),
    W_19("2周","2W",19),
    W_20("2周","2W",20),
    W_21("2周","2W",21),
    W_22("2周","2W",22),
    W_23("2周","2W",23),
    W_24("2周","2W",24),
    W_25("2周","2W",25),
    W_26("2周","2W",26),
    W_27("2周","2W",27),
    W_28("2周","2W",28),
    W_29("2周","2W",29),
    W_30("2周","2W",30),
    W_31("2周","2W",31);

    private String configName;
    private String configKey;
    private Integer number;

    FtpDepositLoanRateConfigKeyDaysTypeEnum(String configName, String configKey, Integer number) {
        this.configName = configName;
        this.configKey = configKey;
        this.number = number;
    }

    public String getConfigName() {
        return configName;
    }

    public String getConfigKey() {
        return configKey;
    }

    public Integer getNumber() {
        return number;
    }

    public static FtpDepositLoanRateConfigKeyDaysTypeEnum valuesByKey(String key){
        for(FtpDepositLoanRateConfigKeyDaysTypeEnum enums : FtpDepositLoanRateConfigKeyDaysTypeEnum.values()){
            if(enums.getConfigKey().equals(key)){
                return enums;
            }
        }
        return null;
    }

    public static FtpDepositLoanRateConfigKeyDaysTypeEnum valuesByNumber(Integer numVal){
        for(FtpDepositLoanRateConfigKeyDaysTypeEnum enums : FtpDepositLoanRateConfigKeyDaysTypeEnum.values()){
            if(enums.getNumber().equals(numVal)){
                return enums;
            }
        }
        return null;
    }

}